<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
                            <i class="fa  fa-fw fa-reorder"></i> 产品详情
                       </li>
                    </ol>
                </div>
            </div>
            <div class="row">
                    <form method="post" action="/admin_policy">
                <div clas="col-md-4">
                   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a class="btn btn-success" id="default">重置</a>
                    &nbsp;&nbsp;
                     <!--<select name="insurance_name">
                         <option>保险公司</option>
                       <?foreach($tHPIDatas as $tRow){?>
                         <option <?if($pInsuranceName == $tRow['INSURANCE_NAME']){echo 'selected';}?>><?=$tRow['INSURANCE_NAME']?></option>
                       <?}?>
                     </select>-->
                    &nbsp;&nbsp; <!--<select name="policyno">
                         <option>保单号</option>
                       <?foreach($tPDatas as $tRow){?>
                        <option <?if($pPolicyNo == $tRow['POLICYNO']){echo 'selected';}?>><?=$tRow['POLICYNO']?></option>
                       <?}?>
                     </select>-->
                    &nbsp;&nbsp; <!--<select name="status">
                         <option>编辑状态</option>
                        <option value="1" <?if($pStatus == '1'){echo 'selected';}?>>已编辑</option>
                        <option value="0" <?if($pStatus == '0'){echo 'selected';}?>>未编辑</option>
                     </select>-->
                          <button type="button" class="btn btn-default" id="search" href="/admin_sign" style="float:right;right:35px;margin-right:40px;"><i class="fa fa-search"></i></button>
<input type="text" placeholder="请输入投保单位关键字" value="<?=$pKey?>" name="key" class="form-controll" style="float:right;width:335px;height:33px;">
                          </div>
            </div>
            </div>

            <div class="panel-body text-center">
                <table class="table table-hover" id="sample-table-1">
                    <thead>
                        <tr>
                            <td>编号</td>
                            <td>保险公司
                     <select name="insurance_name">
                         <option value="">请选择</option>
                       <?foreach($tHPIDatas as $tRow){?>
                         <option <?if($pInsuranceName == $tRow['INSURANCE_NAME']){echo 'selected';}?>><?=$tRow['INSURANCE_NAME']?></option>
                       <?}?>
                     </select>
							</td>
                            <td>保单号
                    <select name="policyno">
                         <option value="">请选择</option>
                       <?foreach($tPDatas as $tRow){?>
                        <option <?if($pPolicyNo == $tRow['POLICYNO']){echo 'selected';}?>><?=$tRow['POLICYNO']?></option>
                       <?}?>
                     </select>
							</td>
                            <td>投保单位</td>
                            <td>编辑状态
                    <select name="status">
                         <option>请选择</option>
                        <option value="1" <?if($pStatus == '1'){echo 'selected';}?>>已编辑</option>
                        <option value="0" <?if($pStatus == '0'){echo 'selected';}?>>未编辑</option>
                     </select>
							</td>
                           <!-- <td>保单起期</td>-->
                           <!-- <td>保单止期</td>-->
                           <!-- <td>产品名称</td>-->
                            <td>操作</td>
                        </tr>
                    </thead>
                    <?foreach($tDatas as $tRow){?>
                    <tr>
                    <td><?=$tRow['ID']?></td>
                    <td><?=$tRow['INSURANCE_NAME']?></td>
                       <!-- <td><?=$tRow['insurance_no']?></td>-->
                        <td><?=$tRow['POLICYNO']?></td>
                        <td><?=$tRow['POLICYNAME']?></td>
                    <td><?=empty($tRow['status'])?'未编辑':'已编辑'?></td>
                        <!--<td><?=$tRow['starttime']?></td>-->
                       <!-- <td><?=$tRow['endtime']?></td>-->
                        <!--<td><?=$tRow['products_name']?></td>-->
                        <td>
                            <div class="visible-md visible-lg hidden-sm hidden-xs">
                            <a href="/admin_policy/edit?id=<?=$tRow['ID']?>&status=<?=$tRow['status']?>&policyno=<?=$tRow['POLICYNO']?>" class="btn btn-blue btn-xs tooltips" data-placement="top" data-original-title="编辑处理"><i class="fa fa-list"></i></a>
                            </div>

                            <div class="visible-xs visible-sm hidden-md hidden-lg">
                                <div class="btn-group">
                                    <a class="btn btn-green dropdown-toggle btn-sm" data-toggle="dropdown" href="#">
                                        <i class="fa fa-cog"></i> <span class="caret"></span>
                                    </a>
                                    <ul role="menu" class="dropdown-menu pull-right dropdown-dark">
                                        <li>
                                        <a role="menuitem" tabindex="-1" href="/admin_policy/edit?id=<?=$tRow['ID']?> && status=<?=$tRow['status']?>&& policyno=<?=$tRow['POLICYNO']?>">
                                                <i class="fa fa-edit"></i>编辑处理
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                        </td>
                    </tr>
<?}?>
                </table>
                <?=$tShow?>
            </div>
        </div>
                        </form>
        <div class="subviews">
            <div class="subviews-container"></div>
        </div>
    </div>
    <!-- end: PAGE -->
</div>
<!-- end: MAIN CONTAINER -->
<script type="text/javascript" src="/plugins/datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$('.form_date').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 2,
    startDate:'2016-01-01',
    endDate:'2030-12-30',
    pickerPosition: "bottom-left",
    forceParse: 1
});
</script>

<script>
$('#search').click(function(){
    $('form').submit();
});
$('select').on('change',function(){
	$('#search').trigger('click');		
});
$('#default').click(function(){
    window.location.href = '/admin_policy';
});
</script>
<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
